<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>查询用户信息</title>
    <link type="text/css" rel="stylesheet" href="/css/style.css"/>

</head>
<script type="text/javascript" src="../vue/vue.js"></script>
<script type="text/javascript" src="../vue/axios.js"></script>
<body>
<div id="app">


            <div> 客户列表</div>
                   <div>
                    <table>
                        <ul>
                            <li>
                                <tr>
                                    <td>姓名</td>
                                    <td>身份证号</td>
                                    <td>电话号码</td>

                                </tr>
                            </li>
                        </ul>



                        <ul>
                            <li v-for='item in userList' v-model="item">
                                   {{item.name}}
                                    {{item.idCard}}
                                    {{item.telNum}}
                            </li>
                        </ul>

                    </table>
                   </div>
<div>
    <button id="back" v-on:ckick="back">返回首页</button>
</div>

<div>
     <button id="add" v-on:ckick="add">添加</button>
</div>



</div>
</body>

<script>

    var vm = new Vue({
      el:"#app",
        data:{
          userList:[]
        },

        created:function () {
            axios.post("/users/checkAllUsers").then(

                function (value) {
                    console.log(value.data.data);
                    var userList666=  value.data.data;
                    this.userList=userList666;
                    console.log(this.userList);
                }
            )
        },
        mounted:function() {
            setTimeout(
              this.created,
                (1000))
        },
      method:{
          checkAll:function () {
              axios.post("/users/checkAllUsers").then(

                  function (value) {
                      console.log(value.data.data);
                     var userList=  value.data.data;
                     this.userList=userList;
                  }
              )
          },
          back:function () {
              location.href="localhost:8082/api"
          },
          add:function () {
              location.href="/page/toadd.html"
          }

      }


    })


</script>
<script type="text/javascript" src="/js/jquery-1.8.3.js"></script>
<script type="text/javascript" src="/js/jump.js"></script>
</html>
